import { Rule, RuleType, } from '@midwayjs/validate';
const required = RuleType.string().required();
export class UserDto{
    @Rule(RuleType.string().guid())
    user_id: string;
    @Rule(required.min(0).max(20))
    account: string;
    @Rule(required.min(0).max(20))
    password: string;
    @Rule(required.min(0).max(20))
    name: string;
    @Rule(RuleType.string().email())
    email: string;
    @Rule(RuleType.number().valid(1, 0))
    valid_flag: number;
    @Rule(RuleType.date())
    create_time: Date;
}

export class UpdateUserDto{
    @Rule(RuleType.string().guid())
    user_id: string;
    @Rule(RuleType.string().min(0).max(20))
    account: string;
    @Rule(RuleType.string().min(0).max(20))
    password: string;
    @Rule(RuleType.string().min(0).max(20))
    name: string;
    @Rule(RuleType.string())
    email: string;
}
export class UserLoginDto{
    @Rule(required)
    account: string;
    @Rule(required)
    password: string;
}

export class is_wgjDto{
    @Rule(RuleType.string().guid())
    is_wgjId: string;
    @Rule(RuleType.string().guid())
    userId: string;
    @Rule(RuleType.number().valid(1, 0))
    is_wgj: number;
}

